<?php

class UserLogin extends Portlet
{
    // {{{ init
    public function init()
    {
        $this->title = Yii::t('site','Log In');
        if($this->controller->route=='site/login')
            $this->visible=false;
        parent::init();
    } // }}} 
    // {{{ renderContent
    protected function renderContent()
    {
        $form=new LoginForm;
        if(isset($_POST['LoginForm']))
        {
            $form->attributes=$_POST['LoginForm'];
            if($form->validate())
                $this->controller->refresh();
        }
        $this->render('userLogin',array('form'=>$form,'currentLang' => Yii::app()->language));
    } // }}} 
}
